package com.compoundsystem.admin.controller;
import com.compoundsystem.admin.result.Result;
import com.compoundsystem.admin.service.AdminService;
import com.compoundsystem.dto.AdminLoginDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class AdminController {
    @Autowired
    AdminService adminService;

    //处理登入
    @PostMapping("/api/login")
    @CrossOrigin
    public Result login(@RequestBody AdminLoginDto adminLoginDto){
        return adminService.login(adminLoginDto);
    }
}
